package com.jinmdz.fmis.dao.dao;

import com.jinmdz.fmis.dao.dao.provider.FaceLiftItemProvider;
import com.jinmdz.fmis.dao.model.facelift.FaceLiftChargeItem;
import com.jinmdz.fmis.dao.model.facelift.FaceLiftItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.ArrayList;

/**
 * 整容Dao
 *
 * @author GuanKui
 * @date 2020/2/17 12:34
 */
public interface FaceLiftItemDao {

    /**
     * 根据ID查询整容信息
     *
     * @param id 主键
     * @return
     * @author GuanKui
     * @date 2020/2/17 12:45
     */
    @Select(" select id,business_code,service_item_id,require_finish_time,reality_finish_time,finish_user_id,process_state_code,random_code,charge_id,version " +
            " from face_lift_item where id = #{id} and deleted=0 ")
    FaceLiftItem getFaceLiftItemById(@Param("id") Integer id);


    /**
     * 根据business_code查询整容信息
     *
     * @param businessCode 业务编码
     * @return
     * @author GuanKui
     * @date 2020/2/17 12:45
     */
    @SelectProvider(type = FaceLiftItemProvider.class, method = "listFaceLiftChargeByBusinessCode")
    ArrayList<FaceLiftChargeItem> listFaceLiftChargeByBusinessCode(@Param("businessCode") String businessCode);
}
